package src;

/**
 * Interface defining the callback methods that must be supported for the socket
 * threads to send data back to. Modified to handle networking in the context of
 * our game.
 * 
 * @author Anurag, Mr. Peck
 * @version May 26, 2014
 * @author Period: 4
 * @author Assignment: SuperTicTacToe
 * 
 * @author Sources: Mr. Peck: NetTileGW
 */
public interface NetworkClient
{
    /**
     * Replay a remove move over the network. The socket where the message
     * originated is provided in case you wish to display that information with
     * the message.
     * 
     * @param name
     *            The socket the message came from
     * @param message
     *            The chat message received
     */
    public void remoteMove( SocketName name, String message );


    /**
     * Note the creation of a new socket and display it to the user. This allows
     * the user to see which sockets are currently connected and (possibly)
     * disconnect them.
     * 
     * @param name
     *            The socket that was just created
     */
    public void createSocket( SocketName name );


    /**
     * Note the destruction of an existing socket and remove it from the user's
     * display.
     * 
     * @param name
     *            The socket that was just destroyed
     */
    public void destroySocket( SocketName name );

}
